import request from "@/utils/request";

let phoneApi = {
  // 获取手机列表
  getList(query) {
    return request({
      url: "/account/tel/manage/list",
      method: "get",
      params: query,
    });
  },
  // 获取所有手机列表
  getAllList(query) {
    return request({
      url: "/account/tel/manage/allList",
      method: "get",
      params: query,
    });
  },
  //新增
  addPhone(data) {
    return request({
      url: "/account/tel/manage",
      method: "post",
      data: data,
    });
  },
  //编辑
  editPhone(data) {
    return request({
      url: "/account/tel/manage",
      method: "put",
      data,
    });
  },
  //转已空闲
  editListPhone(data) {
    return request({
      url: "/account/tel/manage/editTel",
      method: "put",
      data,
    });
  },
  //删除
  delPhone(id) {
    return request({
      url: `/account/tel/manage/${id}`,
      method: "delete",
    });
  },
  //导出
  daochuPhone(data) {
    return request({
      url: `/account/tel/manage/export`,
      method: "get",
      params: data,
    });
  },
  userStatus(data) {
    return request({
      url: "/account/tel/manage/userStatus",
      method: "post",
      data: data,
    });
  },
  toUse(query) {
    return request({
      url: "account/tel/manage/use/" + query,
      method: "get",
    });
  },
  // 查询短信发送记录列表
  listMsg(query) {
    return request({
      url: "/tel/msg/list",
      method: "get",
      params: query,
    });
  },
};
export default phoneApi;
